//
//  DBHandler.h
//  5.27知识点UI18_SQLite
//
//  Created by dingcong on 16/5/27.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "SelectionModel.h"
#import "NewModel.h"
@class Student;
@interface DBHandler : NSObject
/*单例*/
+ (instancetype)sharedDBHandle;
/*打开数据库*/
- (void)openDB;

/*创建表格*/
- (void)createTable;

/*插入数据*/
- (void)insertModel:(NewModel *)model;

/*删除数据*/
- (void)deleteStudentWithNumber:(NSInteger)number;
/*根据表格名取出所有内容*/
- (NSArray <NewModel *> *)getData;
/*查询*/
- (NSArray <NewModel *> *)searchForName:(NSString *)subjects;
/*删除表格*/
- (void)dropTable;
/*关闭数据库*/
- (void)closeDBhandle;
@end
